A hex editor (or binary file editor or byte editor) is a computer program that allows for manipulation of the fundamental Binary file data that constitutes a computer file. The name 'hex' comes from 'hexadecimal', a standard numerical format for representing binary data. A typical computer file occupies multiple areas on the storage medium, whose contents are combined to form the file. Hex editors that are designed to parse and edit Disk sector data from the physical segments of floppy disk or are sometimes called sector editors or .
Hex editors may be used to correct Data corruption by system or application program problems where it may not be worthwhile to write a special program to make the corrections. They are useful to bypass application edit checks which may prevent correction of erroneous data. They have been used to "patch" executable programs to change or add a few instructions as an alternative to recompilation. Program fixes for IBM mainframe systems are sometimes distributed as patches rather than distributing a complete copy of the affected program.
In most hex editor applications, the data of the computer file is represented as hexadecimal values grouped in 4 groups of 4 (or two groups of 8 bytes), followed by one group of 16 printable ASCII characters which correspond to each pair of hex values (each byte). Non-printable ASCII characters (e.g., Bell) and characters that would take more than one character space (e.g., tab) are typically represented by a dot (".") in the following ASCII field.
Typically, a template is represented as a list of labeled text boxes, such that individual values of a file can be easily edited in the appropriate format (e.g., as string, color, or decimal number). Without template support, it is necessary to find the right offset in a file where the value that is to be changed is stored. Also, raw hex editing may require conversion from hexadecimal to decimal, catering for endianness, or other data type conversion peculiarities.
Templates can be stored as files, thereby exchanged by users, and are often shared publicly over the manufacturer's website. Most if not all hex editors define their own template file format; there is no trend to support a standard or even compatibility between the various formats out in the wild.
Scripting languages vary widely, often being product specific languages resembling MS-DOS batch files, to systems that support fully-fledged scripting languages such as Lua or Python.
|
|